export default function (vue, request) {

    // 请求路由
    let controller = "/demoController";

    /**
     * Get 样例
     * @param param1 参数1
     * @param param2 参数2
     * */
    let getDemo = async function (param1, param2) {

        return await request.get(`${controller}/demoAction`, {
            demoParam1: param1,
            demoParam2: param2
        })
    }

    /**
     * Post 样例
     * @param param1 参数1
     * @param param2 参数2
     * */
    let postDemo = async function (param1, param2) {

        return await request.post(`${controller}/demoAction`, {
            demoParam1: param1,
            demoParam2: param2
        })
    }


    return {
        getDemo,
        postDemo,
    }

}